package com.atom.plugin.flow

import com.android.build.api.transform.DirectoryInput
import com.android.build.api.transform.JarInput
import com.atom.plugin.core.AbstractPlugin
import java.io.File
import java.util.jar.JarEntry


class FlowerPlugin : AbstractPlugin<FlowExtension>() {
    override fun getExtensionClass(): Class<FlowExtension> {
        return FlowExtension::class.java
    }

    override fun isFilterDir(dirFile: DirectoryInput): Boolean {
        return true
    }

    override fun isFilterJar(jarFile: JarInput): Boolean {
        return true
    }

    override fun getExtensionName(): String {
        return this.javaClass.simpleName
    }

    override fun transformDir(classBytes: ByteArray, inputFile: File, outputFile: File): ByteArray {
        return classBytes
    }

    override fun transformJar(
        classBytes: ByteArray,
        entry: JarEntry,
        inputFile: File,
        outputFile: File
    ): ByteArray {
        return classBytes
    }

}